<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{/*权值 0   很容易被覆盖*/
				color: #ffaa00; !important;
				background: #55ffff;!important;
			}
			div{/*权值 1  */
				color: #ff513a;
				background: #55ff00;
			}
			.d1{/*权值 10  */
				color: #ff513a;
				background: #55ff00;
			}
			div.d1{/* 选择器权重之和  权值 10  */
				color: #55ff7f;
				background: #ff513a;
			}
			body div.d1{
				/*权值 12  */
				font-size: 25px;
				color: #aaaaff;
				background: #55ff00;
			}
			div#d1{/*权值 101  */
			font-size: 20px;
			color: #51ff21;
			background: #ff20bc;	
			}
			div#d1:hover{/*权值 111  */
			color: #aaaaff;
			background: #55ff00;	
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color:red">Lorem ipsum dolor sit amet consectetur adipisicing elit. At tempore doloremque repellendus excepturi soluta consequuntur neque corporis. Asperiores dolores labore illum ipsa culpa ullam. Necessitatibus quae consequuntur dolorum a est!</div>
	</body>
</html>